import './App.css';
// import axios from "axios";
// import {useEffect} from "react";
import IndexRouter from "./router/IndexRouter";
import {notification} from "antd";
import {Provider} from "react-redux";
import {store, persistor} from "./redux/store";
import {PersistGate} from 'redux-persist/integration/react'

function App() {

    // 全局配置 notification 提示框
    notification.config({
        maxCount: 1,
        duration: 3,
        rtl: false,
    });

    // 测试反向代理
    // useEffect(() => {
    //     axios.get("/api/mmdb/movie/v3/list/hot.json?ct=%E6%B7%B1%E5%9C%B3&ci=30&channelId=4")
    //         .then(res => {
    //             // console.log(res.data)
    //         })
    // },[])

    // Provider让所有组件都能轻松获得store
    return <Provider store={store}>
        <PersistGate loading={null} persistor={persistor}>
            <IndexRouter/>
        </PersistGate>
    </Provider>
}

export default App;
